Documentation

Developers

Featured Endpoints

Checkouts

Customer Portal

Customer-Sessions

Customers

Discounts

License Keys

Oauth2

Organizations

Products

Issue Funding Endpoints

External Organizations

Repositories

Other Endpoints

Advertisements

Benefits

Checkout-Links

Checkouts

Custom-Fields

Customer Portal

Files

Metrics

Oauth2

Orders

Subscriptions

subscriptions

Update Subscription

patch
/v1/subscriptions/{id}
Update a subscription.
Subscription updated.
A product.
List of benefits granted by the product.
List of medias associated to the product.
List of custom fields attached to the product.
curl -X PATCH \
    'https://api.polar.sh/v1/subscriptions/00000000-0000-0000-0000-000000000000' \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer <token>" \
    -d '{
  "product_price_id": "00000000-0000-0000-0000-000000000000"
}'
Responses
{
  "created_at": "2025-01-07T00:00:00.000Z",
  "modified_at": "2025-01-07T00:00:00.000Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "amount": 0,
  "currency": "string",
  "recurring_interval": "month",
  "status": "incomplete",
  "current_period_start": "2025-01-07T00:00:00.000Z",
  "current_period_end": "2025-01-07T00:00:00.000Z",
  "cancel_at_period_end": false,
  "canceled_at": "2025-01-07T00:00:00.000Z",
  "started_at": "2025-01-07T00:00:00.000Z",
  "ends_at": "2025-01-07T00:00:00.000Z",
  "ended_at": "2025-01-07T00:00:00.000Z",
  "customer_id": "00000000-0000-0000-0000-000000000000",
  "product_id": "00000000-0000-0000-0000-000000000000",
  "price_id": "00000000-0000-0000-0000-000000000000",
  "discount_id": "00000000-0000-0000-0000-000000000000",
  "checkout_id": "00000000-0000-0000-0000-000000000000",
  "customer_cancellation_reason": "customer_service",
  "customer_cancellation_comment": "string",
  "metadata": {},
  "custom_field_data": {},
  "customer": {
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "metadata": {},
    "email": "string",
    "email_verified": false,
    "name": "string",
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "postal_code": "string",
      "city": "string",
      "state": "string",
      "country": "string"
    },
    "tax_id": [
      "string",
      "ad_nrt"
    ],
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "avatar_url": "string"
  },
  "user_id": "00000000-0000-0000-0000-000000000000",
  "user": {
    "id": "00000000-0000-0000-0000-000000000000",
    "email": "string",
    "public_name": "string",
    "avatar_url": "string",
    "github_username": "string"
  },
  "product": {
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "description": "string",
    "is_recurring": false,
    "is_archived": false,
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "metadata": {},
    "prices": [
      {
        "created_at": "2025-01-07T00:00:00.000Z",
        "modified_at": "2025-01-07T00:00:00.000Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "amount_type": "fixed",
        "is_archived": false,
        "product_id": "00000000-0000-0000-0000-000000000000",
        "price_currency": "string",
        "price_amount": 0,
        "type": "recurring",
        "recurring_interval": "month"
      }
    ],
    "benefits": [
      {
        "created_at": "2025-01-07T00:00:00.000Z",
        "modified_at": "2025-01-07T00:00:00.000Z",
        "id": "00000000-0000-0000-0000-000000000000",
        "type": "ads",
        "description": "string",
        "selectable": false,
        "deletable": false,
        "organization_id": "00000000-0000-0000-0000-000000000000",
        "properties": {
          "image_height": 0,
          "image_width": 0
        }
      }
    ],
    "medias": [
      {
        "id": "00000000-0000-0000-0000-000000000000",
        "organization_id": "00000000-0000-0000-0000-000000000000",
        "name": "string",
        "path": "string",
        "mime_type": "string",
        "size": 0,
        "storage_version": "string",
        "checksum_etag": "string",
        "checksum_sha256_base64": "string",
        "checksum_sha256_hex": "string",
        "last_modified_at": "2025-01-07T00:00:00.000Z",
        "version": "string",
        "service": "product_media",
        "is_uploaded": false,
        "created_at": "2025-01-07T00:00:00.000Z",
        "size_readable": "string",
        "public_url": "string"
      }
    ],
    "attached_custom_fields": [
      {
        "custom_field_id": "00000000-0000-0000-0000-000000000000",
        "custom_field": {
          "created_at": "2025-01-07T00:00:00.000Z",
          "modified_at": "2025-01-07T00:00:00.000Z",
          "id": "00000000-0000-0000-0000-000000000000",
          "metadata": {},
          "type": "text",
          "slug": "string",
          "name": "string",
          "organization_id": "00000000-0000-0000-0000-000000000000",
          "properties": {
            "form_label": "string",
            "form_help_text": "string",
            "form_placeholder": "string",
            "textarea": false,
            "min_length": 0,
            "max_length": 0
          }
        },
        "order": 0,
        "required": false
      }
    ]
  },
  "price": {
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "amount_type": "fixed",
    "is_archived": false,
    "product_id": "00000000-0000-0000-0000-000000000000",
    "price_currency": "string",
    "price_amount": 0,
    "type": "recurring",
    "recurring_interval": "month"
  },
  "discount": {
    "duration": "once",
    "type": "fixed",
    "amount": 0,
    "currency": "string",
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "metadata": {},
    "name": "string",
    "code": "string",
    "starts_at": "2025-01-07T00:00:00.000Z",
    "ends_at": "2025-01-07T00:00:00.000Z",
    "max_redemptions": 0,
    "redemptions_count": 0,
    "organization_id": "00000000-0000-0000-0000-000000000000"
  }
}